package com.posjiajia.user.operator.controller;


import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 *
 * @ClassName CommonController
 * @Description 通用控制器
 *
 * @author sunhaojie 3113751575@qq.com
 * @date 2016年8月21日 下午12:06:22
 */
@Controller
public class CommonController {

    @RequestMapping
    public String index(HttpServletRequest request, HttpServletResponse response) {
        String pathInfo = request.getPathInfo();
        if(pathInfo == null || pathInfo.equals("") || pathInfo.equals("/")) {
            return "index";
        }
        return pathInfo;
    }
}
